Skip to content

docs(angular): add RTL Support for the Angular UI Kit - #646

Open
aanshisingh-cometchat wants to merge 6 commits into
mainfrom
docs/angular-uikit-rtl-support
Open

aanshisingh-cometchat wants to merge 6 commits into
mainfrom
docs/angular-uikit-rtl-support

Conversation

@aanshisingh-cometchat

@aanshisingh-cometchat aanshisingh-cometchat commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds RTL (right-to-left) support documentation for the Angular UI Kit v5. It matches the React Native (#645), Android (#627) and Flutter (#622) RTL docs, and replaces the Angular half of the earlier combined draft #618.

New page: RTL Support (ui-kit/angular/customization/rtl-support; sidebar: Features, after Campaigns). It covers:

  • Layout direction vs language, and how 'auto' follows the page's direction (<html dir>); the UI Kit never writes it.
  • Turning RTL on:
    • following <html dir>, set from CometChatLocalize.getDirection(language);
    • UIKitSettingsBuilder.setLayoutDirection('auto' | 'ltr' | 'rtl') for the whole kit;
    • changing it after init with CometChatUIKit.setLayoutDirection, which applies to components created afterwards and must be called after init() (init() applies the builder's value, or 'auto').
  • The per-component layoutDirection input ('ltr' | 'rtl') on every public component. Base components follow the component they sit in.
  • Which setting wins, and why a dir wrapper doesn't override a global 'ltr'/'rtl'.
  • Pages outside the UI Kit and common scenarios.
  • What changes in RTL:
    • layout, menus, popovers and arrow keys, and the icon rules;
    • what stays left to right: audio/video players, the recorder, code blocks, the link dialog's URL field, +N counters, the Calls SDK's call screen;
    • message text, names, mentions, emails, labels, Arabic-Indic digits;
    • the composer.
  • Custom views in RTL: CSS logical properties, :dir(rtl), reading the direction from the element, and passing it to Angular CDK overlays.
  • Languages: Arabic, and adding Hebrew, Persian or Urdu via Localization.

Updated pages:

  • 41 component pages: a layoutDirection row in the properties/inputs table and a "Layout Direction" section with an example and the input's type and default.
    • The pages are Conversations, Conversation Item, Users, User Item, Groups, Group Item, Group Members, Group Member Item, Message Header, Search, Message List, Message Composer, Message Bubble, Message Information, Thread Header, Pinned Messages, Saved Messages, all 13 bubble pages, Stickers Keyboard, Reactions, Reaction List, Reaction Info, Call Buttons, Incoming Call, Outgoing Call, Call Logs, AI Assistant Chat, Markdown Renderer and Notification Feed.
    • Message List, Message Composer, the text/audio/video/image/call bubbles, Call Logs, Reactions and Markdown Renderer also explain their RTL behaviour.
  • Components overview: a Layout Direction entry under the shared component API.
  • Methods: setLayoutDirection in the UIKitSettingsBuilder table, plus a Layout Direction section.
  • Localization: Arabic (ar) added (now 20 languages), and a note that language and layout direction are separate settings. Also fixes the Related "Date/Time Formatting" link, which pointed to the Localization page itself.
  • Troubleshooting: a new RTL section.
  • docs.json: page added to the sidebar. llms-angular-v5.mdx: an RTL rule and the page link.

The TypeScript examples were type-checked against the UI Kit's RTL branch (uikit-angular PR #673, b910b2f3) and @angular/cdk 21: 0 errors. The docs match the PR at d1a2d061, including the call-screen fix. The kit PR is now cometchat-team/uikit-angular#686 (merged into dev-v5); a9c739f brings the docs up to its head (2ad9c79d): getDirection() for every right-to-left language, and the Arabic count texts.

Related Issue(s)

No GitHub issue. Tracked on Multica:

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

Additional Information

  • Merge timing: documents @cometchat/chat-uikit-angular 5.4.0 (from cometchat-team/uikit-angular#686), which is now on npm, so this can merge.
  • Link check: mint broken-links passes, and a script confirmed every new internal link and #anchor resolves. docs.json is valid JSON. A mint dev preview hasn't been run yet.
  • Replaces the Angular part of docs(rtl): right-to-left pages for the React and Angular UI Kits #618. The React part is in its own PR.
  • Not documented: Ongoing Call also takes the input, but it has no docs page here.
  • Differs from React Native: Angular has no useCometChatLayoutDirection equivalent, so custom views read the direction from the element (getComputedStyle(el).direction).

Screenshots (if applicable)

N/A. Text-only changes. RTL screenshots will follow in a separate update.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz

New page ui-kit/angular/customization/rtl-support (Theming group, after
Localization): layout direction vs language, following <html dir>, the
UIKitSettingsBuilder.setLayoutDirection() / CometChatUIKit.setLayoutDirection()
global setting, the per-component layoutDirection input, precedence, what
mirrors, what stays LTR, text direction, custom views and CDK overlays.

Also: a Layout Direction section and input row on the 41 component pages
that take the input, the components overview, Methods, Localization
(Arabic, 20 languages; fixes the Date/Time Formatting link), an RTL
troubleshooting table, the llms index and the docs.json sidebar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
@mintlify

mintlify Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cometchat 🟢 Ready View Preview Dec 1, 2026, 5:29 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

Matches uikit-angular d1a2d061 (PR #673): the ongoing-call frame now has dir="ltr".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
… Search

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@PrajwalDhuleCC PrajwalDhuleCC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this against the Angular UI Kit at the head of cometchat-team/uikit-angular#686 (2ad9c79d, version 5.4.0). The docs were written against d1a2d061, and the kit has had about 40 commits since, so a couple of statements are now out of date (inline).

These match the kit:

  • UIKitSettingsBuilder.setLayoutDirection(), CometChatUIKit.setLayoutDirection(), and init() applying the builder's value (or 'auto') before anything else, so a direction set before init() is replaced.
  • init() selecting the browser's language, so setCurrentLanguage() belongs after it.
  • The exported CometChatLayoutDirection and CometChatTextDirection types.
  • Which components take the input: every documented component page you touched does. Smart Replies, Conversation Starter, Conversation Summary and the other base components don't, and neither do the two search result lists.
  • The order in "Which Setting Wins", including the global setting as it was when the enclosing component was created, and no dir written with 'auto' and nothing set.
  • The dir wrapper warning, the icon table (it matches the kit's mirrored-icons list), mirrored popover placements, the arrow keys, the link dialog's URL field, the call screen, the numbered-list icon, and the CDK overlay's direction option.
  • The new anchor links resolve.

Outside the inline notes:

  • The description still points to uikit-angular PR #673; the kit PR is now cometchat-team/uikit-angular#686.
  • As the description says, this should merge only once 5.4.0 is on npm. The latest there is now 5.3.0, not 5.2.3 as the description says.

I checked these by reading the kit's code, not by running it. Please verify each point yourself.

… texts

Addresses Prajwal's review on #646:
- getDirection() returns 'rtl' for every language written in a right-to-left
  script (56062d18), and the no-argument call uses the language the UI Kit is
  actually showing (rtl-support quick reference and body, methods).
- Localization: new Count Texts section for member_count_*,
  thread_reply_count_*, thread_view_reply_count_*, last_seen_minutes_ago_* and
  last_seen_hours_ago_* (a9e9f9a8), and RelativeTimeConfig minutesPlural /
  hoursPlural. RTL page's Numbers and dates links to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
@aanshisingh-cometchat

Copy link
Copy Markdown
Contributor Author

@PrajwalDhuleCC Thanks. Both inline points are fixed in a9c739f and replied to on their threads. The description now points to cometchat-team/uikit-angular#686 and says npm is at 5.3.0. This still merges only once 5.4.0 is on npm.

Navigation only; the page URL is unchanged, so no redirect is needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz

@ashfaqcometchat ashfaqcometchat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 51ad9f02 against the published @cometchat/chat-uikit-angular 5.4.0 (on npm since today, so the merge-timing note in the description no longer blocks).

No build, redirect or link problems: 0 dangling nav refs, 0 broken internal links, all new anchors resolve. The documented API (setLayoutDirection, getDirection, CometChatLayoutDirection, CometChatTextDirection, the plural count keys) matches the package, and every component page that gained layoutDirection has the input in 5.4.0.

Minor fixes:

  • "Every public component" overclaims — see the inline comment. The same sentence is in the new Layout Direction entry in components/components-overview.mdx and in the Quick Reference row at rtl-support.mdx:14.
  • Stale language count: ui-kit/angular/overview.mdx:15 still says "19 languages built-in"; Localization now says 20.
  • Description is out of date: it says the page sits under "Theming, after Localization", but docs.json puts it in the Features group after Campaigns; it also says 5.4.0 is not published.

…uages

Addresses Ashfaq's review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SrArYcnTWam26CSxAdeZrz
@aanshisingh-cometchat

Copy link
Copy Markdown
Contributor Author

@ashfaqcometchat Thanks. All three are fixed:

  • "Every public component": fixed in 46f630e, and replied to on the thread.
  • Language count: overview.mdx now says 20 languages, matching Localization.
  • Description: now says the page is under Features, after Campaigns, and that 5.4.0 is on npm, so this can merge.

@ashfaqcometchat ashfaqcometchat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at 46f630e6: all findings from my earlier review are fixed. Approving.

This branch was successfully deployed

1 active deployment
staging — 46f630e6 Deployed Dec 1, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants